package com.yz.jdd.module.cashier.scanpay.exception;

import android.content.Context;


import com.yz.jdd.network.ApiCallback;
import com.yz.jdd.network.NetWorkRequset;
import com.yz.jdd.network.request.PayParams;
import com.yz.jdd.network.request.Request_Pay;
import com.yz.jdd.network.request.Request_PayStatus;

import rx.Subscription;

/**
 * Created by shibin on 2017/2/27.
 * 异常订单处理相关
 */

public class ExceptionModelImpl implements ExceptionContract.IExceptionModel {
    private Context context;

    public ExceptionModelImpl(Context context) {
        this.context = context;
    }

    @Override
    public Subscription getPayStatus(Request_PayStatus request_payStatus, ApiCallback callback) {
        return NetWorkRequset.getPayStatus(request_payStatus, callback);
    }

    @Override
    public PayParams getRequestPayParam(Request_Pay args) {

        PayParams param = new PayParams();
        param.setTotalAmount(args.getTotalAmount());
        param.setUndiscountableAmount(args.getUndiscountableAmount());
//        param.setPayType(args.getPayType());
////        param.setOrderType(args.getOrderType());
        param.setOrderId(args.getOrderId());
//        //储值订单字段
//        param.setMemberMobile(args.getMemberMobile());
//        param.setMemberCardId(args.getMemberCardId());
//        param.setRechargeAmount(args.getRechargeAmount());
//        param.setTemplateId(args.getTemplateId());
//        param.setDonateAmount(args.getDonateAmount());
        param.setClientOrderId(args.getClientOrderId());
//        //点餐相关
//        param.setTableNum(args.getTableNum());
//        param.setTableName(args.getTableName());
//        param.setAreaName(args.getAreaName());
//        param.setMoling(args.getMoling());
//        param.setPayPassword(args.getMembercardPwd());
//        param.setSubPayType(args.getSubPayType());
        param.setAuthCode(args.getAuthCode());
//        param.setVoucherId(args.getVoucherId());
//        param.setActivityId(args.getActivityId());
        param.setRemark(args.getRemark());
        param.setShopId(args.getShopId());
        //分期相关
        param.setHbfqNum(args.getHbfqNum());
        return param;
    }


}
